package ru.tennisworld.user.entities;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.MapsId;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.Data;

import java.time.LocalDate;

@Data
@Entity
@Table(name = "TENNIS_USER_PROFILES")
public class TennisUserProfile {

    @Id
    @Column(name = "TENNIS_USER_ID")
    private Long userId;

    @Column(name = "FIRST_NAME")
    private String firstName;

    @Column(name = "SURNAME")
    private String lastName;

    @Column(name = "PATRONYMIC")
    private String patronymic;

    @Column(name = "EXPERIENCE")
    private Long experience;

    @Column(name = "BIRTHDAY")
    private LocalDate birthday;

    @Column(name = "USER_RATING")
    private Long rating;

    @MapsId
    @OneToOne
    @JoinColumn(name = "TENNIS_USER_ID")
    private TennisUser tennisUser;

}
